package chapter6.e2;

import java.util.LinkedList;

public class e2 {
    public static void main(String[] args) {
        LinkedList link = new LinkedList();
        link.add("郑赛");
        link.add("小丑");
        link.add("吉祥物");
        link.add("扑克王");
        link.add(Math.PI);
        //查看link长度
        System.out.println("集合长度："+link.size());
        System.out.println(link);
        //查看指定位置元素
        System.out.println("第二个元素:"+link.get(1));
        //修改指定元素
        link.set(2,"常青树");
        System.out.println(link);
        link.add(2,"顶梁柱");
        System.out.println(link);
        link.remove(5);
        System.out.println(link);

    }
}
